package com.example.demo.niuke;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @Description:
 * @Author: LLL
 * @Date: 2020-03-21 22:34
 **/
public class Main19 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String readLine;
        while ((readLine = br.readLine()) != null) {
            StringBuffer sb = new StringBuffer();
            char[] charArray = readLine.toCharArray();
            for (int i = 0; i < 26; i++) {
                char z = (char) ('A' + i);
                for (int j = 0; j < charArray.length; j++) {
                    char ch = charArray[j];
                    if (ch == z || z + 32 == ch) {
                        sb.append(ch);
                    }
                }
            }
            for (int j = 0; j < charArray.length; j++) {
                char c = readLine.charAt(j);
                if (!(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z')) {
                    sb.insert(j, c);
                }
            }
            System.out.println(sb.toString());
        }
    }
}
